package com.feri.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@TableName("t_order")
@NoArgsConstructor
public class Order {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String no;//编号，唯一性，雪花算法
    private double totalmoney;//总金额
    private double freemoney;//总金额
    private double paymoney;//总金额
    private long aid;
    private long uid;
    /**
     * a.已下单 待支付 1
     * b.已付款 待发货 2
     * c.已发货 待收货 3.
     * d.已收货 待确认 4
     * e.已确认 待评价 5
     * f.已评价 6
     * g.已超时7
     * h.已取消 8
     * i.已售后 9*/
    private int flag;//状态
    private String info;
    private Date ctime;

    public Order(String no, double totalmoney, double freemoney, double paymoney, long aid, long uid, String info) {
        this.no = no;
        this.totalmoney = totalmoney;
        this.freemoney = freemoney;
        this.paymoney = paymoney;
        this.aid = aid;
        this.uid = uid;
        this.info = info;
        this.flag=1;
        this.ctime=new Date();
    }

}
